﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
    <script src="jquery.cookie.js"></script>
    <script src="AcountOperate.js"></script>
    <input type="button" value="登录处理" id="btn1" />
    <input type="button" value="获取登录用户信息" id="btn2" />

    <h1></h1>
    <script>
        //account.getSessionID();
        account.login_init();
        $('#btn1').click(function () {
            account.checkuser('张三', '123', function (data) {
                $.cookie('user', data, { path: '/' });
            });
        });
        $('#btn2').click(function () {
            var result = account.getuser();
            $('h1').text(result);
        }).trigger('click');
    </script>
</body>
</html>